<template>
	<view class="index-container">
		<!-- <Title :title="title" /> -->
		<div :style="{height: statusBarHeight +'px'}"></div>
		<div class="header">
			<div class="back center" @click="back">
				<image src="/static/icon/back.png" mode="widthFix" class="w-26 mt-20"></image>
			</div>
			<u-search placeholder="请搜索公司名称" :showAction="false" :animation="false" bgColor="#fff" v-model="keyword"
				class="searchSty" @search="handleSearch" @keyup.enter.native="handleEnter"></u-search>
		</div>
		<BusiInfo :keyword="keyword" v-if="loading" />
		<!-- <List /> -->

	</view>
</template>

<script>
import Title from './components/title.vue'
// import List from './components/list.vue'
import BusiInfo from './components/busiInfo.vue'
export default {
	components: {
		Title,
		// List,
		BusiInfo
	},
	data() {
		return {
			keyword: '', loading: false,
			statusBarHeight: uni.getStorageSync('statusBarHeight') || 0,
		}
	},
	onLoad() {
		this.loading = true
	},
	methods: {
		back() {
			// uni.navigateBack()
			this.cback()
		},
		handleSearch(value) {
			console.log(this.keyword)
			var that = this
			this.loading = false
			setTimeout(function () {
				that.loading = true
			}, 500)
		},
		handleEnter() {
			console.log(this.keyword)
			var that = this
			this.loading = false
			setTimeout(function () {
				that.loading = true
			}, 500)
		}
	}
}
</script>

<style lang="less">
page {
	background-color: #F6F7FB;
}

.index-container {
	width: 100%;
	min-height: 100vh;
	background: #F6F7FB url("/static/bg/backcolorImg.png") no-repeat top / 100%;
	position: fixed;
	z-index: 60;
}

.header {
	font-size: 34rpx;
	height: 100rpx;
	line-height: 100rpx;
	font-weight: bold;
	text-align: center;
	position: relative;

	.searchSty {
		width: 95%;
		height: 78rpx;
		margin-left: 34rpx;

		/deep/ .u-search__content {
			height: 100%;
			margin-left: 68rpx;
			margin-top: 40rpx;
		}

		/deep/ .u-search__content__input--placeholder {
			color: #8C8C8C;
			font-family: "PingFang SC";
			font-size: 26rpx;
			font-style: normal;
			font-weight: 400;
		}

		/deep/ .u-icon__icon {
			font-size: 40rpx !important;
			margin-top: 0rpx;
		}
	}
}

.back {
	position: absolute;
	width: 70rpx;
	height: 70rpx;
	top: 15rpx;
}
</style>
